<?php

namespace App\Observers;

use App\Models\Answer;

class AnswerObserver
{
    //
    public function created(Answer $answer)
    {
        $answer->activities()->create([
            'user_id'=>$answer->user_id,
            'type' =>'created_answer',
        ]);
    }
}
